
//
//  UILabel+UILabel_TopLeftLabel.m
//  LabelShow
//
//  Created by 曾墨 on 16/9/20.
//  Copyright © 2016年 YuanJiang. All rights reserved.
//


#import "UILabel+UILabel_TopLeftLabel.h"

@implementation UILabel (UILabel_TopLeftLabel)
-(void) setTopAlignmentWithText:(NSString *)text maxHeight:(CGFloat)maxHeight
{
    CGRect frame = self.frame;
    CGSize size = [text sizeWithFont:self.font constrainedToSize:CGSizeMake(frame.size.width, maxHeight)];
    frame.size = CGSizeMake(frame.size.width, size.height);
    self.frame =frame;
    self.text =text;
    
}


@end
